#include<iostream>
class Test
{

    public:
    //初始化列表
    //const变量必须在初始化列表中初始化
    Test(int b):a(0),b(b)
    {
        b=1;
    }
    void show()
    {
        std::cout<<this->a<<"\n"<<this->b<<"\n";
    }

    private:
    const int a;
    int b;

};


int main()
{

Test t(2);
t.show();

}